<?php
$tdatapermissions=array();
	$tdatapermissions[".NumberOfChars"]=80; 
	$tdatapermissions[".ShortName"]="permissions";
	$tdatapermissions[".OwnerID"]="";
	$tdatapermissions[".OriginalTable"]="permissions";


	
//	field labels
$fieldLabelspermissions = array();
if(mlang_getcurrentlang()=="English")
{
	$fieldLabelspermissions["English"]=array();
	$fieldToolTipspermissions["English"]=array();
	$fieldLabelspermissions["English"]["id"] = "Id";
	$fieldToolTipspermissions["English"]["id"] = "";
	$fieldLabelspermissions["English"]["module_id"] = "Module";
	$fieldToolTipspermissions["English"]["module_id"] = "";
	$fieldLabelspermissions["English"]["role_id"] = "Role";
	$fieldToolTipspermissions["English"]["role_id"] = "";
	$fieldLabelspermissions["English"]["value"] = "Value";
	$fieldToolTipspermissions["English"]["value"] = "";
	$fieldLabelspermissions["English"]["permission_id"] = "Permission";
	$fieldToolTipspermissions["English"]["permission_id"] = "";
	if (count($fieldToolTipspermissions["English"])){
		$tdatapermissions[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="Chinese (Hong Kong S.A.R.)")
{
	$fieldLabelspermissions["Chinese (Hong Kong S.A.R.)"]=array();
	$fieldToolTipspermissions["Chinese (Hong Kong S.A.R.)"]=array();
	$fieldLabelspermissions["Chinese (Hong Kong S.A.R.)"]["id"] = "Id";
	$fieldToolTipspermissions["Chinese (Hong Kong S.A.R.)"]["id"] = "";
	$fieldLabelspermissions["Chinese (Hong Kong S.A.R.)"]["module_id"] = "Module Id";
	$fieldToolTipspermissions["Chinese (Hong Kong S.A.R.)"]["module_id"] = "";
	$fieldLabelspermissions["Chinese (Hong Kong S.A.R.)"]["role_id"] = "Role Id";
	$fieldToolTipspermissions["Chinese (Hong Kong S.A.R.)"]["role_id"] = "";
	$fieldLabelspermissions["Chinese (Hong Kong S.A.R.)"]["value"] = "Value";
	$fieldToolTipspermissions["Chinese (Hong Kong S.A.R.)"]["value"] = "";
	$fieldLabelspermissions["Chinese (Hong Kong S.A.R.)"]["permission_id"] = "Permission Id";
	$fieldToolTipspermissions["Chinese (Hong Kong S.A.R.)"]["permission_id"] = "";
	if (count($fieldToolTipspermissions["Chinese (Hong Kong S.A.R.)"])){
		$tdatapermissions[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="Chinese (Taiwan)")
{
	$fieldLabelspermissions["Chinese (Taiwan)"]=array();
	$fieldToolTipspermissions["Chinese (Taiwan)"]=array();
	$fieldLabelspermissions["Chinese (Taiwan)"]["id"] = "Id";
	$fieldToolTipspermissions["Chinese (Taiwan)"]["id"] = "";
	$fieldLabelspermissions["Chinese (Taiwan)"]["module_id"] = "Module Id";
	$fieldToolTipspermissions["Chinese (Taiwan)"]["module_id"] = "";
	$fieldLabelspermissions["Chinese (Taiwan)"]["role_id"] = "Role Id";
	$fieldToolTipspermissions["Chinese (Taiwan)"]["role_id"] = "";
	$fieldLabelspermissions["Chinese (Taiwan)"]["value"] = "Value";
	$fieldToolTipspermissions["Chinese (Taiwan)"]["value"] = "";
	$fieldLabelspermissions["Chinese (Taiwan)"]["permission_id"] = "Permission Id";
	$fieldToolTipspermissions["Chinese (Taiwan)"]["permission_id"] = "";
	if (count($fieldToolTipspermissions["Chinese (Taiwan)"])){
		$tdatapermissions[".isUseToolTips"]=true;
	}
}
if(mlang_getcurrentlang()=="French")
{
	$fieldLabelspermissions["French"]=array();
	$fieldToolTipspermissions["French"]=array();
	$fieldLabelspermissions["French"]["id"] = "Id";
	$fieldToolTipspermissions["French"]["id"] = "";
	$fieldLabelspermissions["French"]["module_id"] = "Module Id";
	$fieldToolTipspermissions["French"]["module_id"] = "";
	$fieldLabelspermissions["French"]["role_id"] = "Role Id";
	$fieldToolTipspermissions["French"]["role_id"] = "";
	$fieldLabelspermissions["French"]["value"] = "Value";
	$fieldToolTipspermissions["French"]["value"] = "";
	$fieldLabelspermissions["French"]["permission_id"] = "Permission Id";
	$fieldToolTipspermissions["French"]["permission_id"] = "";
	if (count($fieldToolTipspermissions["French"])){
		$tdatapermissions[".isUseToolTips"]=true;
	}
}


	
	$tdatapermissions[".NCSearch"]=true;

	

$tdatapermissions[".shortTableName"] = "permissions";
$tdatapermissions[".nSecOptions"] = 0;
$tdatapermissions[".recsPerRowList"] = 1;	
$tdatapermissions[".tableGroupBy"] = "0";
$tdatapermissions[".mainTableOwnerID"] = "";
$tdatapermissions[".moveNext"] = 1;




$tdatapermissions[".showAddInPopup"] = false;

$tdatapermissions[".showEditInPopup"] = false;

$tdatapermissions[".showViewInPopup"] = false;


$tdatapermissions[".fieldsForRegister"] = array();

$tdatapermissions[".listAjax"] = true;

	$tdatapermissions[".audit"] = false;

	$tdatapermissions[".locking"] = false;
	
$tdatapermissions[".listIcons"] = true;
$tdatapermissions[".edit"] = true;
$tdatapermissions[".inlineEdit"] = true;
$tdatapermissions[".view"] = true;

$tdatapermissions[".exportTo"] = true;

$tdatapermissions[".printFriendly"] = true;

$tdatapermissions[".delete"] = true;

$tdatapermissions[".showSimpleSearchOptions"] = true;

$tdatapermissions[".showSearchPanel"] = true;


$tdatapermissions[".isUseAjaxSuggest"] = true;

$tdatapermissions[".rowHighlite"] = true;


// button handlers file names

$tdatapermissions[".addPageEvents"] = false;

$tdatapermissions[".arrKeyFields"][] = "id";

// use datepicker for search panel
$tdatapermissions[".isUseCalendarForSearch"] = false;

// use timepicker for search panel
$tdatapermissions[".isUseTimeForSearch"] = false;

$tdatapermissions[".isUseiBox"] = false;



$tdatapermissions[".isUseInlineAdd"] = true;

$tdatapermissions[".isUseInlineEdit"] = true;
$tdatapermissions[".isUseInlineJs"] = $tdatapermissions[".isUseInlineAdd"] || $tdatapermissions[".isUseInlineEdit"];

$tdatapermissions[".allSearchFields"] = array();

$tdatapermissions[".globSearchFields"][] = "id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("id", $tdatapermissions[".allSearchFields"]))
{
	$tdatapermissions[".allSearchFields"][] = "id";	
}
$tdatapermissions[".globSearchFields"][] = "module_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("module_id", $tdatapermissions[".allSearchFields"]))
{
	$tdatapermissions[".allSearchFields"][] = "module_id";	
}
$tdatapermissions[".globSearchFields"][] = "role_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("role_id", $tdatapermissions[".allSearchFields"]))
{
	$tdatapermissions[".allSearchFields"][] = "role_id";	
}
$tdatapermissions[".globSearchFields"][] = "value";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("value", $tdatapermissions[".allSearchFields"]))
{
	$tdatapermissions[".allSearchFields"][] = "value";	
}
$tdatapermissions[".globSearchFields"][] = "permission_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("permission_id", $tdatapermissions[".allSearchFields"]))
{
	$tdatapermissions[".allSearchFields"][] = "permission_id";	
}


$tdatapermissions[".googleLikeFields"][] = "id";
$tdatapermissions[".googleLikeFields"][] = "module_id";
$tdatapermissions[".googleLikeFields"][] = "role_id";
$tdatapermissions[".googleLikeFields"][] = "value";
$tdatapermissions[".googleLikeFields"][] = "permission_id";



$tdatapermissions[".advSearchFields"][] = "id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("id", $tdatapermissions[".allSearchFields"])) 
{
	$tdatapermissions[".allSearchFields"][] = "id";	
}
$tdatapermissions[".advSearchFields"][] = "module_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("module_id", $tdatapermissions[".allSearchFields"])) 
{
	$tdatapermissions[".allSearchFields"][] = "module_id";	
}
$tdatapermissions[".advSearchFields"][] = "role_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("role_id", $tdatapermissions[".allSearchFields"])) 
{
	$tdatapermissions[".allSearchFields"][] = "role_id";	
}
$tdatapermissions[".advSearchFields"][] = "value";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("value", $tdatapermissions[".allSearchFields"])) 
{
	$tdatapermissions[".allSearchFields"][] = "value";	
}
$tdatapermissions[".advSearchFields"][] = "permission_id";
// do in this way, because combine functions array_unique and array_merge returns array with keys like 1,2, 4 etc
if (!in_array("permission_id", $tdatapermissions[".allSearchFields"])) 
{
	$tdatapermissions[".allSearchFields"][] = "permission_id";	
}

$tdatapermissions[".isTableType"] = "list";


	

$tdatapermissions[".isDisplayLoading"] = true;

$tdatapermissions[".isResizeColumns"] = false;





$tdatapermissions[".pageSize"] = 20;

$gstrOrderBy = "";
if(strlen($gstrOrderBy) && strtolower(substr($gstrOrderBy,0,8))!="order by")
	$gstrOrderBy = "order by ".$gstrOrderBy;
$tdatapermissions[".strOrderBy"] = $gstrOrderBy;
	
$tdatapermissions[".orderindexes"] = array();

$tdatapermissions[".sqlHead"] = "SELECT id,   module_id,   role_id,   `value`,   permission_id";
$tdatapermissions[".sqlFrom"] = "FROM permissions";
$tdatapermissions[".sqlWhereExpr"] = "";
$tdatapermissions[".sqlTail"] = "";




//fill array of records per page for list and report without group fields
$arrRPP = array();
$arrRPP[] = 10;
$arrRPP[] = 20;
$arrRPP[] = 30;
$arrRPP[] = 50;
$arrRPP[] = 100;
$arrRPP[] = 500;
$arrRPP[] = -1;
$tdatapermissions[".arrRecsPerPage"] = $arrRPP;

//fill array of groups per page for report with group fields
$arrGPP = array();
$arrGPP[] = 1;
$arrGPP[] = 3;
$arrGPP[] = 5;
$arrGPP[] = 10;
$arrGPP[] = 50;
$arrGPP[] = 100;
$arrGPP[] = -1;
$tdatapermissions[".arrGroupsPerPage"] = $arrGPP;

	$tableKeys = array();
	$tableKeys[] = "id";
	$tdatapermissions[".Keys"] = $tableKeys;

//	id
	$fdata = array();
	$fdata["strName"] = "id";
	$fdata["ownerTable"] = "permissions";
		$fdata["Label"]="Id"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		$fdata["AutoInc"]=true;
	
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "id";
	
		$fdata["FullName"]= "id";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 1;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		
		
		
		
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatapermissions["id"]=$fdata;
//	module_id
	$fdata = array();
	$fdata["strName"] = "module_id";
	$fdata["ownerTable"] = "permissions";
		$fdata["Label"]="Module"; 
	
		
		
	$fdata["FieldType"]= 3;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "module_id";
	
		$fdata["FullName"]= "module_id";
	
		$fdata["IsRequired"]=true; 
	
		
		
		
		
				$fdata["Index"]= 2;
				$fdata["EditParams"]="";
			
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
				$fdata["validateAs"]["basicValidate"][] = getJsValidatorName("Number");	
						$fdata["validateAs"]["basicValidate"][] = "IsRequired";
	
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatapermissions["module_id"]=$fdata;
//	role_id
	$fdata = array();
	$fdata["strName"] = "role_id";
	$fdata["ownerTable"] = "permissions";
		$fdata["Label"]="Role"; 
	
		
		
	$fdata["FieldType"]= 201;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text area";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "role_id";
	
		$fdata["FullName"]= "role_id";
	
		
		
		
		
		
				$fdata["Index"]= 3;
			$fdata["EditParams"] = "";
			$fdata["EditParams"].= " rows=100";
		$fdata["nRows"] = 100;
			$fdata["EditParams"].= " cols=200";
		$fdata["nCols"] = 200;
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatapermissions["role_id"]=$fdata;
//	value
	$fdata = array();
	$fdata["strName"] = "value";
	$fdata["ownerTable"] = "permissions";
		$fdata["Label"]="Value"; 
	
		
		
	$fdata["FieldType"]= 200;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text field";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "value";
	
		$fdata["FullName"]= "`value`";
	
		
		
		
		
		
				$fdata["Index"]= 4;
				$fdata["EditParams"]="";
			$fdata["EditParams"].= " maxlength=5";
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatapermissions["value"]=$fdata;
//	permission_id
	$fdata = array();
	$fdata["strName"] = "permission_id";
	$fdata["ownerTable"] = "permissions";
		$fdata["Label"]="Permission"; 
	
		
		
	$fdata["FieldType"]= 201;
	
		
			$fdata["UseiBox"] = false;
	
	$fdata["EditFormat"]= "Text area";
	$fdata["ViewFormat"]= "";
	
		
		
		
		
		$fdata["NeedEncode"]=true;
	
	$fdata["GoodName"]= "permission_id";
	
		$fdata["FullName"]= "permission_id";
	
		
		
		
		
		
				$fdata["Index"]= 5;
			$fdata["EditParams"] = "";
			$fdata["EditParams"].= " rows=100";
		$fdata["nRows"] = 100;
			$fdata["EditParams"].= " cols=200";
		$fdata["nCols"] = 200;
		
		$fdata["bListPage"]=true; 
	
		$fdata["bAddPage"]=true; 
	
		$fdata["bInlineAdd"]=true; 
	
		$fdata["bEditPage"]=true; 
	
		$fdata["bInlineEdit"]=true; 
	
		$fdata["bViewPage"]=true; 
	
		$fdata["bAdvancedSearch"]=true; 
	
		$fdata["bPrinterPage"]=true; 
	
		$fdata["bExportPage"]=true; 
	
	//Begin validation
	$fdata["validateAs"] = array();
		
		//End validation
	
				$fdata["FieldPermissions"]=true;
	
		
				
		
		
		
			$tdatapermissions["permission_id"]=$fdata;

	
$tables_data["permissions"]=&$tdatapermissions;
$field_labels["permissions"] = &$fieldLabelspermissions;
$fieldToolTips["permissions"] = &$fieldToolTipspermissions;

// -----------------start  prepare master-details data arrays ------------------------------//
// tables which are detail tables for current table (master)
$detailsTablesData["permissions"] = array();

	
// tables which are master tables for current table (detail)
$masterTablesData["permissions"] = array();

// -----------------end  prepare master-details data arrays ------------------------------//

require_once(getabspath("classes/sql.php"));










$proto522=array();
$proto522["m_strHead"] = "SELECT";
$proto522["m_strFieldList"] = "id,   module_id,   role_id,   `value`,   permission_id";
$proto522["m_strFrom"] = "FROM permissions";
$proto522["m_strWhere"] = "";
$proto522["m_strOrderBy"] = "";
$proto522["m_strTail"] = "";
$proto523=array();
$proto523["m_sql"] = "";
$proto523["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto523["m_column"]=$obj;
$proto523["m_contained"] = array();
$proto523["m_strCase"] = "";
$proto523["m_havingmode"] = "0";
$proto523["m_inBrackets"] = "0";
$proto523["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto523);

$proto522["m_where"] = $obj;
$proto525=array();
$proto525["m_sql"] = "";
$proto525["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto525["m_column"]=$obj;
$proto525["m_contained"] = array();
$proto525["m_strCase"] = "";
$proto525["m_havingmode"] = "0";
$proto525["m_inBrackets"] = "0";
$proto525["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto525);

$proto522["m_having"] = $obj;
$proto522["m_fieldlist"] = array();
						$proto527=array();
			$obj = new SQLField(array(
	"m_strName" => "id",
	"m_strTable" => "permissions"
));

$proto527["m_expr"]=$obj;
$proto527["m_alias"] = "";
$obj = new SQLFieldListItem($proto527);

$proto522["m_fieldlist"][]=$obj;
						$proto529=array();
			$obj = new SQLField(array(
	"m_strName" => "module_id",
	"m_strTable" => "permissions"
));

$proto529["m_expr"]=$obj;
$proto529["m_alias"] = "";
$obj = new SQLFieldListItem($proto529);

$proto522["m_fieldlist"][]=$obj;
						$proto531=array();
			$obj = new SQLField(array(
	"m_strName" => "role_id",
	"m_strTable" => "permissions"
));

$proto531["m_expr"]=$obj;
$proto531["m_alias"] = "";
$obj = new SQLFieldListItem($proto531);

$proto522["m_fieldlist"][]=$obj;
						$proto533=array();
			$obj = new SQLField(array(
	"m_strName" => "value",
	"m_strTable" => "permissions"
));

$proto533["m_expr"]=$obj;
$proto533["m_alias"] = "";
$obj = new SQLFieldListItem($proto533);

$proto522["m_fieldlist"][]=$obj;
						$proto535=array();
			$obj = new SQLField(array(
	"m_strName" => "permission_id",
	"m_strTable" => "permissions"
));

$proto535["m_expr"]=$obj;
$proto535["m_alias"] = "";
$obj = new SQLFieldListItem($proto535);

$proto522["m_fieldlist"][]=$obj;
$proto522["m_fromlist"] = array();
												$proto537=array();
$proto537["m_link"] = "SQLL_MAIN";
			$proto538=array();
$proto538["m_strName"] = "permissions";
$proto538["m_columns"] = array();
$proto538["m_columns"][] = "id";
$proto538["m_columns"][] = "module_id";
$proto538["m_columns"][] = "role_id";
$proto538["m_columns"][] = "value";
$proto538["m_columns"][] = "permission_id";
$obj = new SQLTable($proto538);

$proto537["m_table"] = $obj;
$proto537["m_alias"] = "";
$proto539=array();
$proto539["m_sql"] = "";
$proto539["m_uniontype"] = "SQLL_UNKNOWN";
	$obj = new SQLNonParsed(array(
	"m_sql" => ""
));

$proto539["m_column"]=$obj;
$proto539["m_contained"] = array();
$proto539["m_strCase"] = "";
$proto539["m_havingmode"] = "0";
$proto539["m_inBrackets"] = "0";
$proto539["m_useAlias"] = "0";
$obj = new SQLLogicalExpr($proto539);

$proto537["m_joinon"] = $obj;
$obj = new SQLFromListItem($proto537);

$proto522["m_fromlist"][]=$obj;
$proto522["m_groupby"] = array();
$proto522["m_orderby"] = array();
$obj = new SQLQuery($proto522);

$queryData_permissions = $obj;
$tdatapermissions[".sqlquery"] = $queryData_permissions;

$tableEvents["permissions"] = new eventsBase;

?>
